(defun generate-mark()
  (interactive)
  (setq filename (buffer-file-name))
  (setq n (line-number-at-pos))
  (setq linenumber (number-to-string n))
  (setq total (concat filename "\:" linenumber "\:" "\n"))
  (switch-to-buffer-other-window "temp")
  (insert total)
  )

(global-set-key [(C-f1)] 'generate-mark)